//
//  XWTestViewController.swift
//  SensorRef
//
//  Created by huanlv on 2017/9/13.
//  Copyright © 2017年 Wade. All rights reserved.
//

import UIKit

class XWTestViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        
    }
}
// MARK: - 摇一摇
extension XWTestViewController {
    override func motionBegan(_ motion: UIEventSubtype, with event: UIEvent?) {
        print("开始摇一摇\(motion.rawValue)")
    }
    override func motionCancelled(_ motion: UIEventSubtype, with event: UIEvent?) {
        print("摇一摇被取消\(motion.rawValue)")
    }
    override func motionEnded(_ motion: UIEventSubtype, with event: UIEvent?) {
        print("摇一摇被停止\(motion.rawValue)")
    }
}
